package hong.helloWorld.orm.dao.cms;

import hong.helloWorld.orm.entity.cms.Context;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

@Mapper
public interface ContextMapper {

    @Results(id = "userResult", value = {
            @Result(property = "id", column = "ID", id = true),
            @Result(property = "userId", column = "USER_ID"),
            @Result(property = "title", column = "TITLE"),
            @Result(property = "content", column = "CONTENT"),
            @Result(property = "createTime", column = "CREATE_TIME", jdbcType = JdbcType.DECIMAL)
    })
    @Select("select * from test_context")
    List<Context> selectAll();


    int insert(Context context);

    int updateById(Context context);


}
